/**
 * vue bootstrap component
 * author:gl
 * date:2017/03/21
 * description: these components start with vb-
 */


// public methods
/**
 * drop down
 * @param {Object} obj
 */
var changeDropDown = function(obj){
	var jqueryObj = $(obj);
	var itemStr = jqueryObj.html();
	$(obj).parent().parent().prev('button').find('span:first').html(itemStr);
}

/**
 * check box 
 * @param {Object} obj
 */
var check = function(obj) {
	var innerHtml = $(obj).html();
	if(innerHtml) {
		$(obj).html("");
	} else {
		$(obj).html('<i class="glyphicon glyphicon-ok"></i>');
	}
};




//public component

//jquery


//vue
Vue.component('vb-checkbox',{
	template:'<label class="checkbox-inline">'+
			'<input type="checkbox" value=""/>'+							
		'<span class="check" @click.native="check" ></span>'+
		'</label>'
});


Vue.component('vb-confirm',{
	template:'<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">\
			  <div class="modal-dialog modal-sm" role="document">\
			    <div class="modal-content">\
			      ...\
			    </div>\
			  </div>\
			</div>'
});



